package com.woniu.pojo;

import com.fasterxml.jackson.annotation.JsonFormat;

import java.io.Serializable;
import java.util.Date;

/**
 * course
 * @author 
 */
public class Course implements Serializable {
    private Integer courseId;

    private String courseName;

    private String courseDetail;

    private String courseAttribute;

    private Integer courseScore;

    @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8")
    private Date courseStartTime;

    private Integer courseTotal;

    private static final long serialVersionUID = 1L;

    public Integer getCourseId() {
        return courseId;
    }

    public void setCourseId(Integer courseId) {
        this.courseId = courseId;
    }

    public String getCourseName() {
        return courseName;
    }

    public void setCourseName(String courseName) {
        this.courseName = courseName;
    }

    public String getCourseDetail() {
        return courseDetail;
    }

    public void setCourseDetail(String courseDetail) {
        this.courseDetail = courseDetail;
    }

    public String getCourseAttribute() {
        return courseAttribute;
    }

    public void setCourseAttribute(String courseAttribute) {
        this.courseAttribute = courseAttribute;
    }

    public Integer getCourseScore() {
        return courseScore;
    }

    public void setCourseScore(Integer courseScore) {
        this.courseScore = courseScore;
    }

    public Date getCourseStartTime() {
        return courseStartTime;
    }

    public void setCourseStartTime(Date courseStartTime) {
        this.courseStartTime = courseStartTime;
    }

    public Integer getCourseTotal() {
        return courseTotal;
    }

    public void setCourseTotal(Integer courseTotal) {
        this.courseTotal = courseTotal;
    }

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        Course other = (Course) that;
        return (this.getCourseId() == null ? other.getCourseId() == null : this.getCourseId().equals(other.getCourseId()))
            && (this.getCourseName() == null ? other.getCourseName() == null : this.getCourseName().equals(other.getCourseName()))
            && (this.getCourseDetail() == null ? other.getCourseDetail() == null : this.getCourseDetail().equals(other.getCourseDetail()))
            && (this.getCourseAttribute() == null ? other.getCourseAttribute() == null : this.getCourseAttribute().equals(other.getCourseAttribute()))
            && (this.getCourseScore() == null ? other.getCourseScore() == null : this.getCourseScore().equals(other.getCourseScore()))
            && (this.getCourseStartTime() == null ? other.getCourseStartTime() == null : this.getCourseStartTime().equals(other.getCourseStartTime()))
            && (this.getCourseTotal() == null ? other.getCourseTotal() == null : this.getCourseTotal().equals(other.getCourseTotal()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getCourseId() == null) ? 0 : getCourseId().hashCode());
        result = prime * result + ((getCourseName() == null) ? 0 : getCourseName().hashCode());
        result = prime * result + ((getCourseDetail() == null) ? 0 : getCourseDetail().hashCode());
        result = prime * result + ((getCourseAttribute() == null) ? 0 : getCourseAttribute().hashCode());
        result = prime * result + ((getCourseScore() == null) ? 0 : getCourseScore().hashCode());
        result = prime * result + ((getCourseStartTime() == null) ? 0 : getCourseStartTime().hashCode());
        result = prime * result + ((getCourseTotal() == null) ? 0 : getCourseTotal().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", courseId=").append(courseId);
        sb.append(", courseName=").append(courseName);
        sb.append(", courseDetail=").append(courseDetail);
        sb.append(", courseAttribute=").append(courseAttribute);
        sb.append(", courseScore=").append(courseScore);
        sb.append(", courseStartTime=").append(courseStartTime);
        sb.append(", courseTotal=").append(courseTotal);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}